﻿using Module.ExternalDevice.DuoJi.Views;
using Module.ExternalDevice.MCU.LED.Views;
using Module.MSDMMotionShell.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Regions;

namespace Module.MSDMMotionShell
{
    public class MSDMMotionShellModule : IModule
    {
        public void OnInitialized(IContainerProvider containerProvider)
        {
            var regionManager = containerProvider.Resolve<IRegionManager>();//解耦
            //右侧按钮导航注册为discovery 模式，加载的时候直接注册，适合界面不用变更
            regionManager.RegisterViewWithRegion("SingleDJRegion", typeof(PUC_OneDjTest));//左侧当行按钮
            regionManager.RegisterViewWithRegion("MultyDJRegion", typeof(PUC_DJ_ZL_MS));//左侧当行按钮

            regionManager.RegisterViewWithRegion("LEDRegion", typeof(McuControlLed));//左侧当行按钮
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<PUC_MSDMHomeShell>();
            containerRegistry.RegisterForNavigation<PUC_MSDMMotionParamShell>();
            containerRegistry.RegisterForNavigation<PUC_MSComDeviceShell>();
        }
    }
}